<?
require_once('includes_php/helpers/functions.php');
//ob_start("ob_gzhandler");
global $db;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	    <title>GS Associates</title>
	    
		
	    <!-- Top Navigational Menu -->
	    <!--[if lte IE 7]>
	    <link rel="stylesheet" type="text/css" href="includes/ie.css" media="screen" />
	    <![endif]-->
	    <script type="text/javascript" src="includes_cssjs/jquery.min.js" charset="utf-8"></script> 
	    <script type="text/javascript" src="includes_cssjs/jquery.dropdownPlain.js"></script>
	    <script type="text/javascript" src="includes_cssjs/jquery.hint.js"></script> 
	    <script type="text/javascript" src="includes_cssjs/jquery-ui-1.8.11.custom.min.js"></script>
	    <!-- /Top Navigational Menu -->
		
	    <link rel="stylesheet" type="text/css" href="includes_cssjs/style.css" /> 
	    <link rel="stylesheet" type="text/css" href="includes_cssjs/table.css" /> 
	    <link rel="stylesheet" type="text/css" href="includes_cssjs/cupertino/jquery-ui-1.8.11.custom.css" />
	    <link rel="stylesheet" type="text/css" href="includes_cssjs/breadcrumb.css" />
	    <style type="text/css">
		.ui-autocomplete-category {
		    font-weight: bold;
		    padding: .2em .4em;
		    margin: .8em 0 .2em;
		    line-height: 1.5;
		    border-bottom: 1px solid #ededed;
		    color:#3baae3;
		}
	    </style>
	    <script type="text/javascript">
		$.widget( "custom.catcomplete", $.ui.autocomplete, {
		    _renderMenu: function( ul, items ) {
			var self = this,
			currentCategory = "";
			$.each( items, function( index, item ) {
			    if ( item.category != currentCategory ) {
				ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
				currentCategory = item.category;
			    }
			    self._renderItem( ul, item );
			});
		    }
		});
	    </script>

	    <script type="text/javascript">
		jQuery(document).ready(function(){
		    $('#birds').catcomplete({
			source:'autocomplete_search.php', 
			minLength:2,
			select: function(event, ui) { window.location.href = ui.item.link;}
		    });
		});
		
		var loading = $('#loading');  
		var content = $('#browseDiv'); 
		
		function showLoading(){  
		    content 
		    .css({visibility:"visible"})  
		    .css({opacity:"1"})  
		    .css({display:"block"});  
		}  
		//hide loading bar  
		function hideLoading(){  
		    loading.fadeTo(1000, 0);  
		    content.slideDown();  
		};  
		
		function doLoad(url) {
		    $('#browseDiv').load(url, hideLoading())
		}
		
		function paginate(type, brand, page, sortBy, noAddHash) {
		    
		    $(document).ready(function() {
			
			var url = 'browse_ajax.php?type=' + type + '&&brand=' + brand + '&&page=' + page;
			if(!sortBy) {
			    
			}
			else {
			    if(sortBy != 'null') {
				url = url + '&&sortBy='+sortBy;
			    }
			}
			if(noAddHash) {
			    
			}
			else {
			    window.location.hash = '#' + (page + 1);
			}
			$('#loading').fadeIn(200);
			$('#browseDiv').slideUp(20, function() {
			    $('#browseDiv').load(url, function() {
				$('#loading').fadeOut(50);
				$('#browseDiv').slideDown(200);
			    });
			});
			
		    });
		}
	    </script>
		
		
		
		
	    <script type="text/javascript"> 
		var active_color = '#333'; // Colour of user provided text
		var inactive_color = '#888'; // Colour of default text
		$(document).ready(function() {
		    $("textarea.default-value").css("color", inactive_color);
		    var default_values = new Array();
		    $("textarea.default-value").focus(function() {
			if (!default_values[this.id]) {
			    default_values[this.id] = this.value;
			}
			if (this.value == default_values[this.id]) {
			    this.value = '';
			    this.style.color = active_color;
			}
			$(this).blur(function() {
			    if (this.value == '') {
				this.style.color = inactive_color;
				this.value = default_values[this.id];
			    }
			});
		    });
		});
		$(function(){ 
		    // find all the input elements with title attributes
		    $('input[title!=""]').hint();
		});
	    </script> 
		
		
    </head>
    <body>

	<div id="container">
	    <div id="header">
		
		<div id="logo">
		    <a href="index.php"><img src="images/logo.png" alt="GS Associates" style="border: 0;"></a>
		</div>
		    
		<div id="search">
		    <form action="search.php">
			<input type="text" class="searchbox" id="birds" name="s" title="Search for..." value="" />
			<input type="image" src="images/blankSearchButton.png" class="searchbox_submit" value="" />
		    </form>
		</div>
	    </div>
		
	    <div id="navigation_top">
		
		
		
		
		<!--- BEGIN NAVIGATION --->
		    
		<ul class="dropdown">
		    <li class="hasDropDownMenu"><a href="equipment.php" style="padding-right: 11px; margin-right: 5px;">Equipment</a>
			<ul class="sub_menu">
			    
			    <?
			    foreach (getAllTypes(true, true) as $returned) {
				echo "<li>";
				echo "<a href=\"browse_by_type.php?type=" . $returned . "\">";
				echo lookup_typeById($returned);
				echo "</a></li>";
			    }
			    ?>
					    
			    <li><a href="equipment.php" class="moreLink">-- More --</a></li>
			</ul>
		    </li>
		    <li class="hasDropDownMenu"><a href="manufacturers.php" style="padding-right: 11px; margin-right: 5px;">Manufacturers</a>
			<ul class="sub_menu">
			    
			    
<?
foreach (getAllBrands(true, true) as $returned) {
    echo "<li>";
    echo "<a href=\"browse_by_brand.php?brand=" . $returned . "\">";
    echo lookup_brandById($returned);
    echo "</a></li>";
}
?>
					    
			    <li><a href="manufacturers.php" class="moreLink">-- More --</a></li>
			</ul>
		    </li>
		    <!--
		    <li class="hasDropDownMenu"><a href="#" style="padding-right: 11px; margin-right: 5px;">Rentals</a>
			<ul class="sub_menu">
			    <li><a href="#">Tektronix</a></li>
			    <li><a href="#">Instek</a></li>
			    <li><a href="#">Advantest</a></li>
			    <li><a href="#">Agilent Technologies</a></li>
			    <li><a href="#">Rohde &amp; Schwarz</a></li>
			    <li><a href="#">Digital Lightwave</a></li>
			    <li><a href="#">Chroma</a></li>
			    <li><a href="#">Anritsu</a></li>
			    <li><a href="#">Fluke Networks</a></li>
			</ul>
		    </li>
      -->
		    <!--
		    <li class="hasDropDownMenu"><a href="#" style="padding-right: 11px; margin-right: 5px;">Trade-Ins &amp; Buy Back</a>
			<ul class="sub_menu">
			    <li><a href="#">Test</a></li>
			    <li><a href="#">Test</a></li>
			    <li><a href="#">Test</a></li>
			    <li><a href="#">Test</a></li>
			    <li><a href="#">Test</a></li>
			    <li><a href="#"> - VIEW ALL - </a></li>
			</ul>
		    </li>
      -->
		    <li><a href="sell.php">Trade-Ins &amp; Buy Back</a></li>
		   <!-- <li><a href="#">Lab Services</a></li>-->
			
		    </li>
			
		    <li><a href="about.php">About Us</a>
		    </li>
		</ul>
		    
		    
		    
		<!--- END NAVIGATION --->
		    
		    
	    </div>
		
<?php
if ($TYPE_OF_PAGE == 'full') {

    echo "<div id=\"full_wrapper\">";
} elseif ($TYPE_OF_PAGE == 'two_column') {

    echo "<div id=\"wrapper\">";

    if (!empty($TYPE_OF_MENU)) {
	include('includes_menus/' . $TYPE_OF_MENU . '.php');
    } else {
	header("Location: error.php?errorMsg=no_menu");
	exit(0);
    }
}
?>
			    
			    
	    <div id="content">
		
		<!-- Content --> 